<?php

namespace app\models;

use think\Model;

/**
 * Class CampusModel.
 */
class StudentSubjectInfosClassModel extends Model
{
    protected $table = 'edu_class_subject_student_infos';

    /**
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     *
     * @return string
     */
    public static function getIds()
    {
        $campus = self::select()->toArray();
        $arr = [];
        foreach ($campus as $cap) {
            $arr[] = $cap['id'];
        }

        return implode(',', $arr);
    }

    /**
     * @param $id
     * @param string $type
     *
     * @throws \think\exception\DbException
     *
     * @return null|array|AuthGroupAccessModel
     */
    public static function getById($id, $type = 'all')
    {
        if (!is_numeric($id)) {
            return [];
        }
        $campus = self::get(['id' => $id]);
        if ($campus) {
            return (isset($campus[$type])) ? $campus[$type] : $campus;
        }

        return [];
    }

    /**
     * @param $param
     *
     * @throws \think\exception\DbException
     *
     * @return array
     */
    public function getStudentLists($param, $id)
    {
        $page = isset($param['page']) ? (int) $param['page'] : 1;
        $listRows = isset($param['limit']) ? (int) $param['limit'] : 10;
        $where = ["class_subject_id" => $id];


        $subject_class_result = SubjectClassModel::get(['id' => $id]);  //排课课程表
        $result = ClassRoomModel::get(['id' => $subject_class_result['class_room_id']]);
        $subject['campus_name'] = CampusModel::get(['id' => $subject_class_result['campus_id']])['campus_name'];//校区名称
        $subject['class_room_name'] = $result['class_name'];//教室名称
        $subject['course_name'] = CourseModel::get(['id' => $subject_class_result['course_id']])['course_name']; //课程名称

		if(get_current_type() == 4 || get_current_type() == 5){
			$where['campus_id'] = get_current_campus_id();
		}elseif (get_current_type() == 2 || get_current_type() == 3){
			$where['campus_id'] = ['in',get_current_campus_id()];
		}
        $listData = self::where($where)
            ->paginate($listRows, false, ['page' => $page])
            ->toArray();
        if (!empty($listData)) {
            foreach ($listData['data'] as &$item) {

                $item['campus_name'] = $subject['campus_name'];
                $item['class_room_name'] =  $subject['class_room_name'];
                $item['course_name'] = $subject['course_name'];
                $number_len = strlen($item['seat_number']."");
                $str_ = "";
                for($p=0; $p< $number_len; $p++){
                    $str_ = $str_."0";
                }
                $value = $str_.$item['seat_number'];
                $value = '锁定编号'.'【'.$value.'】';
                if($item['seat_number'] == NULL){
                    $item['status_text']  =  '<span  style="color:#FF5722;font-weight: bold;">未选中</span>';
                }else{
                    $item['status_text']  =   '<span style="color:#01AAED;font-weight: bold;">'.$value.'</span>';
                }
            }
        }

        return $listData;
    }

    /****补课信息**/
    public function Makeuplessons($param){
        $GradesDetailsModel = new GradesDetailsModel();  // 班级
        $page = isset($param['page']) ? (int) $param['page'] : 1;
        $listRows = isset($param['limit']) ? (int) $param['limit'] : 10;
        $where = ['attendance' => 0,'status' => 1, 'lessons_status' => 0]; //未考勤,已上课,未补课

        if (isset($param['student_name']) && '' !== $param['student_name']) {
            $where['student_name'] = ['like', '%'.$param['student_name'].'%'];
        }

        //课程ID
        if (isset($param['course_id']) && '' !== $param['course_id']) {
            $where['course_id'] = ['like', '%'.$param['course_id'].'%'];
        }


        //时间段
        if (isset($param['start_date']) && '' !== $param['start_date'] && isset($param['end_date']) && '' !== $param['end_date']) {
            $where['class_date'] = array('between', array($param['start_date'],$param['end_date']));
        }

        //校区
        if (isset($param['campus_id']) && '' !== $param['campus_id']) {
            $where['campus_id'] = $param['campus_id'];
        }else {
            if (get_current_type() == 4 || get_current_type() == 5) {
                $where['campus_id'] = get_current_campus_id();
            } elseif (get_current_type() == 2 || get_current_type() == 3) {
                $where['campus_id'] = ['in', get_current_campus_id()];
            }
        }


        //获取补课学生
        if(get_current_type() == 5){
            if(get_current_group_type() == 2){  //老师类
                $grades_res = $GradesDetailsModel->where(['user_teacher_id' => get_current_id()])->column('id');
                $grades_res_str = implode(',',$grades_res);
                $where['class_subject_id'] = ['in',$grades_res_str];
            }else if(get_current_group_type() == 3){  //助教类
                $grades_res = $GradesDetailsModel->where(['user_assistant_id' => get_current_id()])->column('id');
                $grades_res_str = implode(',',$grades_res);
                $where['class_subject_id'] = ['in',$grades_res_str];
            }else if(get_current_group_type() == 4){ //班主任
                $grades_res = $GradesDetailsModel->where(['user_master_id' => get_current_id()])->column('id');
                $grades_res_str = implode(',',$grades_res);
                $where['class_subject_id'] = ['in',$grades_res_str];
            }else if(get_current_group_type() == 5){ //教务类
                $grades_res = $GradesDetailsModel->where(['user_edu_id' => get_current_id()])->column('id');
                $grades_res_str = implode(',',$grades_res);
                $where['class_subject_id'] = ['in',$grades_res_str];
            }
        }

        $listData = self::where($where)
            ->paginate($listRows, false, ['page' => $page])
            ->toArray();
        //学生信息
        $StudentModel = new StudentModel();
        $student_result = $StudentModel->select();
        $student_data = []; //学员电话
        $student_nums = []; //学员编号
        foreach ($student_result as $key => $value){
            $student_data[$value['id'].''] = $value['phone'];
            $student_nums[$value['id'].''] = $value['student_number'];
        }



        //课程信息
        $CourseModel = new CourseModel();
        $course_result =$CourseModel->select();
        $course_data = [];
        foreach ($course_result as $key => $value){
            $course_data[$value['id'].''] = $value['course_name'];
        }

        if (!empty($listData)) {
            $CampusModel = new CampusModel();
            foreach ($listData['data'] as &$item) {
                $item['student_phone'] = $student_data[$item['student_id'].'']; //电话号码
                $item['course_name']  = $course_data[$item['course_id'].'']; //课程名称
                $item['grades_name'] =GradesDetailsModel::get(['id' => $item['class_subject_id']])['grades_name']; //班级名称
                $res = GradesDetailsListsModel::get(['id' => $item['class_manage_details_id']]);//课程列表信息
                $item['absence_time'] = $res['class_subject_start'].'--'.$res['class_subject_end'];  //缺勤时间
                $item['student_number'] =  $student_nums[$item['student_id'].''];//学员编号
                $item['campus_name'] = $CampusModel->get(['id' => $item['campus_id']])['campus_name']; //校区

                if($item['charging'] == 0){  //未计费
                    $item['charging_status'] = '<span  style="color:#FF5722">×</span>';
                }else if($item['charging'] == 1){  //计费
                    $item['charging_status'] = '<span  style="color:#01AAED">√</span>';

                }
                if($item['attendance_reasons'] == null){
                    $item['attendance_reasons'] = '---';
                }

                if($item['content_area'] == null){
                    $item['content_area'] = '---';
                }

                if($item['remarks'] == null){
                    $item['remarks'] = '---';
                }

                if($res['status'] == 1){
                    $item['class_type'] =  '<span  style="color:#01AAED">已上课</span>';
                }else if($res['status'] == 0){
                    $item['class_type'] =  '<span  style="color:#FF5722">未上课</span>';
                }

            }
        }
        return $listData;

    }



    /****扣费记录信息**/
    public function getDeductionRecordLists($param){

        $GradesDetailsModel = new GradesDetailsModel();  // 班级
        $page = isset($param['page']) ? (int) $param['page'] : 1;
        $listRows = isset($param['limit']) ? (int) $param['limit'] : 10;
        $where = ['charging' => 1]; //已计费
        if (isset($param['student_name']) && '' !== $param['student_name']) {  //学生姓名
            $where['student_name'] = ['like', '%'.$param['student_name'].'%'];
        }

        if (isset($param['contract_number']) && '' !== $param['contract_number']) {
            $where['contract_number'] = ['like', $param['contract_number'].'%'];
        }

        //时间段
        if (isset($param['start_date']) && '' !== $param['start_date'] && isset($param['end_date']) && '' !== $param['end_date']) {
            $where['class_date'] = array('between', array($param['start_date'],$param['end_date']));
        }

        if (isset($param['campus_id']) && '' !== $param['campus_id']) {
            $where['campus_id'] = $param['campus_id'];
        }else {
            if (get_current_type() == 4 || get_current_type() == 5) {
                $where['campus_id'] = get_current_campus_id();
            } elseif (get_current_type() == 2 || get_current_type() == 3) {
                $where['campus_id'] = ['in', get_current_campus_id()];
            }
        }

        //获取补课学生
        if(get_current_type() == 5){
            if(get_current_group_type() == 2){  //老师类
                $grades_res = $GradesDetailsModel->where(['user_teacher_id' => get_current_id()])->column('id');
                $grades_res_str = implode(',',$grades_res);
                $where['class_subject_id'] = ['in',$grades_res_str];
            }else if(get_current_group_type() == 3){  //助教类
                $grades_res = $GradesDetailsModel->where(['user_assistant_id' => get_current_id()])->column('id');
                $grades_res_str = implode(',',$grades_res);
                $where['class_subject_id'] = ['in',$grades_res_str];
            }else if(get_current_group_type() == 4){ //班主任
                $grades_res = $GradesDetailsModel->where(['user_master_id' => get_current_id()])->column('id');
                $grades_res_str = implode(',',$grades_res);
                $where['class_subject_id'] = ['in',$grades_res_str];
            }else if(get_current_group_type() == 5){ //教务类
                $grades_res = $GradesDetailsModel->where(['user_edu_id' => get_current_id()])->column('id');
                $grades_res_str = implode(',',$grades_res);
                $where['class_subject_id'] = ['in',$grades_res_str];
            }
        }



        $listData = self::where($where)
            ->paginate($listRows, false, ['page' => $page])
            ->toArray();

        //课程信息
        $CourseModel = new CourseModel();
        $course_result =$CourseModel->select();
        $course_data = [];
        foreach ($course_result as $key => $value){
            $course_data[$value['id'].''] = $value['course_name'];
        }

        if (!empty($listData)) {
            foreach ($listData['data'] as &$item) {
                $res = GradesDetailsModel::get(['id' => $item['class_subject_id']]);
                $item['course_text'] =  $course_data[$item['course_id'].'']; //课程名称
                $item['grades_name'] =$res['grades_name']; //班级名称
                $item['teacher'] = $res['teacher'];//任课老师
                if($item['contract_number'] == '---'){
                    $item['contract_number'] = '-';
                }
                $item['operatorer'] =  '<span  style="color:#01AAED">'.$item['operatorer'].'</span>'; //操作人
                $item['headmaster'] = $res['headmaster']; //班主任
                $item['amount_deducted'] = '<span  style="color:#FF5722">'.($item['amount_deducted'] / 100).'</span>';
                $item['eliminated_nums'] = '<span  style="color:#01AAED">'.$item['eliminated_nums'].'</span>';
                if($item['attendance'] == 0){
                    $item['attendance_text'] = '<span  style="color:#FF5722">缺勤</span>';
                }else if($item['attendance'] == 1){
                    $item['attendance_text'] = '<span  style="color:#01AAED">正常</span>';
                }
                if($item['attendance_reasons'] == null){
                    $item['attendance_reasons'] = '-';
                }
            }
        }
        return $listData;

    }

    /****课消列表***/
    public function getCourseEliminationLists($param,$course_id){
        $GradesDetailsModel = new GradesDetailsModel();  // 班级
        $page = isset($param['page']) ? (int) $param['page'] : 1;
        $listRows = isset($param['limit']) ? (int) $param['limit'] : 10;
        $where = ['status' => 1,'course_id' => $course_id]; //已上课，特定课程
        if (isset($param['start_date']) && '' !== $param['start_date'] && isset($param['end_date']) && '' !== $param['end_date']) {
            $where['class_date'] = array('between', array($param['start_date'],$param['end_date']));
        }

        if (isset($param['campus_id']) && '' !== $param['campus_id']) {
            $where['campus_id'] = $param['campus_id'];
        }else{
            if(get_current_type() == 4 || get_current_type() == 5){
                $where['campus_id'] = get_current_campus_id();
            }elseif (get_current_type() == 2 || get_current_type() == 3){
                $where['campus_id'] = ['in',get_current_campus_id()];
            }
        }

        //获取补课学生
        if(get_current_type() == 5){
            if(get_current_group_type() == 2){  //老师类
                $grades_res = $GradesDetailsModel->where(['user_teacher_id' => get_current_id()])->column('id');
                $grades_res_str = implode(',',$grades_res);
                $where['class_subject_id'] = ['in',$grades_res_str];
            }else if(get_current_group_type() == 3){  //助教类
                $grades_res = $GradesDetailsModel->where(['user_assistant_id' => get_current_id()])->column('id');
                $grades_res_str = implode(',',$grades_res);
                $where['class_subject_id'] = ['in',$grades_res_str];
            }else if(get_current_group_type() == 4){ //班主任
                $grades_res = $GradesDetailsModel->where(['user_master_id' => get_current_id()])->column('id');
                $grades_res_str = implode(',',$grades_res);
                $where['class_subject_id'] = ['in',$grades_res_str];
            }else if(get_current_group_type() == 5){ //教务类
                $grades_res = $GradesDetailsModel->where(['user_edu_id' => get_current_id()])->column('id');
                $grades_res_str = implode(',',$grades_res);
                $where['class_subject_id'] = ['in',$grades_res_str];
            }
        }

        $listData = self::where($where)
            ->paginate($listRows, false, ['page' => $page])
            ->toArray();
        $course_name = CourseModel::get(['id' => $course_id])['course_name']; //课程名称
        if (!empty($listData)) {
            foreach ($listData['data'] as &$item) {
                $student_result = StudentModel::get(['id' => $item['student_id']]);
                $item['student_number'] = $student_result['student_number']; //学号
                $item['student_name'] = $student_result['name']; //姓名
                if($student_result['grade'] != 0){
                    $item['grade'] = DictionaryModel::get(['id' => $student_result['grade']])['name']; //年级
                }else{
                    $item['grade'] = '-';
                }
                $item['course_name'] = $course_name; //课程名称
                $grade_result = GradesDetailsModel::get(['id' => $item['class_subject_id']]);
                $item['class_grade'] = $grade_result['grades_name']; //班级名称
                $item['teacher'] = $grade_result['teacher']; //任课老师
                if ($grade_result['assistant'] != null && strlen($grade_result['assistant']) > 0){
                    $item['assistant'] = $grade_result['assistant']; //助教
                }else{
                    $item['assistant'] = '-'; //助教
                }

                $item['headmaster'] = $grade_result['headmaster']; //班主任

                $item['status'] = '已课消';

                $class_result = GradesDetailsListsModel::get(['id' => $item['class_manage_details_id']]);
                $item['class_time'] = $class_result['class_date'].' '.$class_result['class_subject_start'];  //开课时间

            }
        }

        return $listData;
    }


    /**
     * @param $param
     *
     * @throws \think\exception\DbException
     *详细课节
     * @return array
     */
    public function getInfoClassLists($param)
    {
        $GradesDetailsModel = new GradesDetailsModel();  // 班级
        $GradesDetailsListsModel = new GradesDetailsListsModel(); //课节
        $CourseModel = new CourseModel();
        $page = isset($param['page']) ? (int) $param['page'] : 1;
        $listRows = isset($param['limit']) ? (int) $param['limit'] : 10;
        $where = [];
        $where['status'] = 1;  //已上课


        //课程
        if (isset($param['course_id']) && '' !== $param['course_id']) {
            $where['course_id'] = $param['course_id'];
        }

        //班主任名字
        if (isset($param['headmaster_name_info']) && '' !== $param['headmaster_name_info']) {
            $headmaster_id_arr = UserModel::where(['name' => ['like', '%'.$param['headmaster_name_info'].'%']])->column('id');
            $grades_id_arr = $GradesDetailsModel->where(['user_master_id' => ['in', implode(',',$headmaster_id_arr)]])->column('id');
            $where['class_subject_id'] = ['in', implode(',',$grades_id_arr)];
        }

        if(isset($param['teacher_name_info']) && '' !== $param['teacher_name_info'] && isset($param['assistant_name_info']) && '' !== $param['assistant_name_info']){

            $teacher_id_arr_teacher = TeacherModel::where(['teacher_name' => ['like', '%'.$param['teacher_name_info'].'%']])->column('id');
            $grades_id_arr_teacher = $GradesDetailsModel->where(['teacher_id' => ['in', implode(',',$teacher_id_arr_teacher)]])->column('id');

            $teacher_id_arr_assistant = TeacherModel::where(['teacher_name' => ['like', '%'.$param['assistant_name_info'].'%']])->column('id');
            $grades_id_arr_assistant = $GradesDetailsModel->where(['assistant_id' => ['in', implode(',',$teacher_id_arr_assistant)]])->column('id');

            $subject_id_arr = [];
            for($i = 0; $i < count($grades_id_arr_teacher); $i ++){
                        if(in_array($grades_id_arr_teacher[$i],$grades_id_arr_assistant)){
                            $subject_id_arr[] = $grades_id_arr_teacher[$i];
                        }
            }
            $where['class_subject_id'] = ['in', implode(',',$subject_id_arr)];

        }else{
            //老师名字
            if (isset($param['teacher_name_info']) && '' !== $param['teacher_name_info']) {
                $teacher_id_arr = TeacherModel::where(['teacher_name' => ['like', '%'.$param['teacher_name_info'].'%']])->column('id');
                $grades_id_arr = $GradesDetailsModel->where(['teacher_id' => ['in', implode(',',$teacher_id_arr)]])->column('id');
                $where['class_subject_id'] = ['in', implode(',',$grades_id_arr)];
            }

            //助教名字
            if (isset($param['assistant_name_info']) && '' !== $param['assistant_name_info']) {
                $teacher_id_arr = TeacherModel::where(['teacher_name' => ['like', '%'.$param['assistant_name_info'].'%']])->column('id');
                $grades_id_arr = $GradesDetailsModel->where(['assistant_id' => ['in', implode(',',$teacher_id_arr)]])->column('id');
                $where['class_subject_id'] = ['in', implode(',',$grades_id_arr)];
            }
        }


        //学员名字
        if (isset($param['student_name_info']) && '' !== $param['student_name_info']) {
            $student_id_arr = StudentModel::where(['student_name' => ['like', '%'.$param['student_name_info'].'%']])->column('id');
            $where['student_id'] = ['in', implode(',',$student_id_arr)];
        }

        //班级名称
        if (isset($param['grades_name_info']) && '' !== $param['grades_name_info']) {
            $where['class_subject_id'] = $param['grades_name_info'];
        }

        //班型
        if (isset($param['grades_type_info']) && '' !== $param['grades_type_info']) {
            $course_id_arr = $CourseModel->where(['course_type' => $param['grades_type_info']])->column('id');
            $grades_id_arr = $GradesDetailsModel->where(['course_id' => ['in', implode(',',$course_id_arr)]])->column('id');
            $where['class_subject_id'] = ['in', implode(',',$grades_id_arr)];
        }

        if (isset($param['campus_id']) && '' !== $param['campus_id']) {
            $where['campus_id'] = $param['campus_id'];
        }else{
            if(get_current_type() == 4 || get_current_type() == 5){
                $where['campus_id'] = get_current_campus_id();
            }elseif (get_current_type() == 2 || get_current_type() == 3){
                $where['campus_id'] = ['in',get_current_campus_id()];
            }
        }

        //时间段
        if (isset($param['start_date_class']) && '' !== $param['start_date_class'] && isset($param['end_date_class']) && '' !== $param['end_date_class']) {
            $where['class_date'] = array('between', array($param['start_date_class'],$param['end_date_class']));
        }



        if(get_current_type() == 5){
            if(get_current_group_type() == 2){  //老师类
                $grades_res = $GradesDetailsModel->where(['user_teacher_id' => get_current_id()])->column('id');
                $grades_res_str = implode(',',$grades_res);
                $where['class_subject_id'] = ['in',$grades_res_str];
            }else if(get_current_group_type() == 3){  //助教类
                $grades_res = $GradesDetailsModel->where(['user_assistant_id' => get_current_id()])->column('id');
                $grades_res_str = implode(',',$grades_res);
                $where['class_subject_id'] = ['in',$grades_res_str];
            }else if(get_current_group_type() == 4){ //班主任
                $grades_res = $GradesDetailsModel->where(['user_master_id' => get_current_id()])->column('id');
                $grades_res_str = implode(',',$grades_res);
                $where['class_subject_id'] = ['in',$grades_res_str];
            }else if(get_current_group_type() == 5){ //教务类
                $grades_res = $GradesDetailsModel->where(['user_edu_id' => get_current_id()])->column('id');
                $grades_res_str = implode(',',$grades_res);
                $where['class_subject_id'] = ['in',$grades_res_str];
            }
        }


        $listData = self::where($where)
            ->paginate($listRows, false, ['page' => $page])
            ->toArray();
        if (!empty($listData)) {
            foreach ($listData['data'] as &$item) {
                $res_student = StudentModel::get(['id' => $item['student_id']]);
                $item['student_name'] = $res_student['student_name'];
                $item['student_number'] =  $res_student['student_number'];
                if($res_student['grade'] != null && strlen($res_student['grade']) > 0){
                    $item['student_grade'] = DictionaryModel::get(['id' => $res_student['grade']])['name'];
                }else{
                    $item['student_grade'] = '-';
                }
                $res_course = CourseModel::get(['id' => $item['course_id']]);
                $item['course_name'] = $res_course['course_name'];
                $item['grades_type'] = DictionaryModel::get(['id' => $res_course['course_type']])['name'];
                $res_grades = $GradesDetailsModel::get(['id' => $item['class_subject_id']]);
                $item['grades_name'] = $res_grades['grades_name'];
                $item['teacher_name'] = TeacherModel::get(['id' => $res_grades['teacher_id']])['teacher_name'];

                if($res_grades['assistant_id']!= null && strlen($res_grades['assistant_id']) > 0){
                    $item['assistant_name'] = TeacherModel::get(['id' => $res_grades['assistant_id']])['teacher_name'];
                }else{
                    $item['assistant_name'] = '-';
                }

                $item['headmaster_name'] = UserModel::get(['id' => $res_grades['user_master_id']])['name'];

                $res_grades_lists = $GradesDetailsListsModel::get(['id' => $item['class_manage_details_id']]);
                $item['class_time'] = $res_grades_lists['class_subject_start'].'&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;'.$res_grades_lists['class_subject_end'];

                $item['class_duration'] = $item['duration'].'/(分钟)';
                if( $item['eliminated_nums'] == 0){
                    $item['eliminated_nums_text'] = '不计课消';
                }else {
                    $item['eliminated_nums_text'] = $item['eliminated_nums'] . '(节)';
                }

                if($item['attendance'] ==  0){
                    $item['attendance_text'] = '未签到';
                }else{
                    $item['attendance_text'] = '已签到';
                }
                $item['operatorer_name'] = UserModel::get(['id' => $item['operatorer_id']])['name'];
            }
        }

        return $listData;
    }


	/**
	 * User: wufeng
	 * Date: 2020/02/27.
	 *
	 * @param $param
	 *
	 * @throws \think\exception\DbException
	 *
	 * @return array
	 */
	public function getStudentCommentLists($param)
	{
		$page = isset($param['page']) ? (int) $param['page'] : 1;
		$listRows = isset($param['limit']) ? (int) $param['limit'] : 10;
		$where = [];
		$where['class_manage_details_id'] = $param['id'];
		$where['is_comment'] = 1;
		$listData = self::where($where)->order('id desc')
			->paginate($listRows, false, ['page' => $page])
			->toArray();
		if (!empty($listData)) {
			foreach ($listData['data'] as &$item) {
				$comment = (new CommentModel())->get(['cmdl_id'=>$item['class_manage_details_id'],'student_id'=>$item['student_id']]);
				//兼容OSSURL
				$item['audio'] = $comment['audio'];
				$item['video'] = $comment['video'];
				$item['picture'] = $comment['picture'];
				$item['time'] = $comment['comment_time'];
				$item['student_scoring'] = $comment['student_scoring'];
				$item['publisher'] = (new UserModel())->get($comment['teacher_id'])['name'];
				$item['content'] = $comment['content'];
				$item['audio_text'] = 'layui-icon-speaker';
				$item['video_text'] = 'layui-icon-video';
				$item['picture_text'] = 'layui-icon-picture';
			}
		}

		return $listData;
	}
}
